import request from '../../utils/request'
const api_name = "address"


export function createAddress(addressinfo) {
    return request({
        url: `/${api_name}/create`,
        method: 'POST',
        data: addressinfo
    })
}

export function editAddress(addressinfo) {
    return request({
        url: `/${api_name}/edit`,
        method: 'PUT',
        data: addressinfo
    })
}

export function delAddress(id) {
    return request({
        url: `/${api_name}/del/${id}`,
        method: 'DELETE'
    })
}

export function getUserAddressList() {
    return request({
        url: `/${api_name}/list`,
        method: 'GET'
    })
}

export function getById(id) {
    return request({
        url: `/${api_name}/${id}`,
        method: 'GET'
    })
}